package com.ray.web.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeNode implements Serializable {
    private Integer id;
    private Integer parentId;
    private String title;
    private String icon;
    private String href;
    private Boolean spread;
    private List<TreeNode> children = new ArrayList<>();

    /**
     * 首页导航数构造器
     */
    public TreeNode(Integer id, Integer parentId, String title, String icon, String href, Boolean spread) {
        this.id = id;
        this.parentId = parentId;
        this.title = title;
        this.icon = icon;
        this.href = href;
        this.spread = spread;
    }
}
